Jan 87 Letters
Volume Number: 3
Issue Number: 1
Column Tag: Letters
Update Events - Who Does them?
Clifford Story
Murfressboro, TN
I was very pleased to receive the first issue of my subscription today, within
three weeks of sending you my check. Great service -something not common in the Mac
world!
I'm sticking my neck out here but I believe Peter McInerney misunderstands the
event manager's handling of update events. His letter in the November issue is a
comment on an article, "Pop-Up Window Scroller" by Scott Boyd, in the September
issue (I have not read the article). Mr. Boyd, in his program, called BeginUpdate and
EndUpdate to "steal" update events. Mr. McInerney protests that these calls have no
effect whatever on the event queue. I believe Mr. McInerney is correct but his
observation is irrelevant.
The point I want to make is that update events have nothing to do with the event
queue either. They do not come from the event queue. Rather, GetNextEvent generates
an update event if some window needs to be redrawn (and there are no pending events of
higher priority). See Inside Macintosh, "Toolbox Event Manager", page I-245.
How does the event manager determine that a window needs to be redrawn? It
examines the update region; if it is nonempty, then the window needs to be redrawn,
and an update event is generated. See "Window Manager" in IM I-278.
One of the effects of BeginUpdate is to zero the window's update region. Thus, if
Mr. Boyd calls BeginUpdate, he indeed "steals" an update event, since with an empty
update region, no update event will be generated for the window. (Mr. Boyd must follow
this call with one to EndUpdate to reset the visrgn, which is altered by BeginUpdate.)
So there are wheels within wheels within the Macintosh, and all is not as it seems
Update on Update Events
Stephen Hanna
Cambridge, MA
First, let me compliment you on the finest technical magazine around. Each issue
provides at least one thought-provoking topic. Unfortunately, each issue also provides
at least one misled technical comment. [If we knew it all, we wouldn't need MacTutor!
-Ed]
Mr. McInerney's letter in the November issue impels me to write and clear
things up. Using the Operating System Event Manager routine FlushEvents to get rid of
update events is useless since these events are never placed in the queue in the first
place, but generated whenever GetNextEvent or EventAvail is called and there is no
higher priority event pending. I look forward to more letters from people living on the
edge of what the Mac can do. Let's show those pinstripes with their PC's the meaning of
"hot code".
This Time The Author Speaks on Update Events!
Scott Boyd
Aggieland, TX
Every time GetNextEvent occurs, the window manager checks the updateRgn of
every visible window and if it finds a non-empty updateRgn, it posts an update event
for that window. Thus, it is essential that updateRgn's are no different than before
when I bring up the OverView window. My workaround to eliminate any update regions
for the front window does this. Much of the feel of OverView is that it is fast and free of
side effects, just like a menu. Thus, update events are unacceptable. If you can see
footprints in the butter, we haven't done our job. Not worrying about update events is
not the answer either, since what generates a non-empty update region for the front
window is that I put another window in front of it: the OverView window! A good friend
of mine, Greg Marriott, is writing an article on a much better way to implement fast
pop-ups which eleminates the restriction that the pop-up not overlap windows other
than the front window. OverView looks even better than before, and it has yet to cause
the generation of a single update event.
Help! MassTech Killed Me!
Gary Mason
4 Lori Lane
Mendo, MA 01756
I upgraded my Mac to a 512K, and then to 2MB with the late great MassTech Corp.
of Groton, Mass. I have recently attempted the Mac+ Rom/Disk upgrade, and was
greeted with abject failure. On power up, not even video appeared. I have since chased
around trying to find someone, anyone, who can provide answers to these two questions:
Can the MassTech 2MB system be upgraded to a Mac + status, and if yes, how?? I'm
including my address in hopes some talented MacTutor reader will write me with an
answer. Moral: Watch out for disappearing computer companies.
Likes VIP
Rod Paine
Purcellville, VA
A comment about your "Random System Crashes" you mentioned in the November
issue. From what I've experienced, you are correct in suspecting the Cmd-Shift-3 fix
for menu snap shots; it raised havoc with the fonts within my dialog boxes, after
printing also. I've gone back to Camera DA. [I haven't had any trouble with the
"official" Apple installer script fixso far. -Ed]
Also, on my two serial port MacBottoms and a new SCSI MacBottom, I'm running
System Files of 510K, but I've discovered that keeping the DA file at 13 DA's and the
font file at 17 fonts, my random system crashes are now a thing of the past. I'm not
suggesting that these are "magic" numbers, but this info might help somebody identify
whey these crashes are a fact, when more DA's and Fonts are brought into play, on